import express from 'express'
import bodyParser from 'body-parser'
import cookieSession from 'cookie-session'
import './controller'
import router from './router'
const app = express()
app.use(bodyParser.urlencoded({ extended: true }))
app.use(
  cookieSession({
    name: 'session',
    keys: ['mySession'],
    maxAge: 1000 * 60 * 60 * 24
  })
)
app.use(router)
app.listen(7001, () => {
  console.log('server is running')
})
